package com.ithe.user.api;

import com.ithe.core.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by zxd on 2022/5/16
 */
@FeignClient(value = "user-service",contextId = "user")
public interface UserFeignClient {

//    /**
//     * 移动端根据token查询用户登录信息
//     */
//    @PostMapping("/app-api/v1/user/query")
//    Result<User> queryUserByToken(@RequestParam String token);
//
//
//    /**
//     * 后台管理根据id查询用户信息
//     * @param userId
//     * @return
//     */
//    @GetMapping("/admin-api/v1/user/{userId}")
//    Result<User>  findUserByID(@PathVariable Long userId);


    /**
     * 根据电话号码查用户
     * @param phone
     * @return
     */
    @PostMapping("/app-api/v1/user/query2")
    Result<User> findUserByPhone(@RequestParam String phone);
}
